home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / rsxwdk2s.zip / RSXWDK / LIBSRC / DOS / DOS5700.C < prev    next >
C/C++ Source or Header  |  1994-12-17  |  454b  |  29 lines

  1. #include <errno.h>
  2. #include <sys/doscalls.h>
  3.  
  4.  
  5. /*
  6. ** AX = 0x5700
  7. ** BX = handle
  8. ** return: CX:DX
  9. */
  10. int dos_getftime(int handle, unsigned short * date, unsigned short * time)
  11. {
  12.     struct REGPACK r;
  13.  
  14.     r.eax = 0x5700;
  15.     r.ebx = handle;
  16.  
  17.     _intr(0x21, &r);
  18.  
  19.     if (r.eflags & 1) {
  20.     _sys_doserror2errno( r.eax & 0xFFFF);
  21.     return (-1);
  22.     }
  23.     else {
  24.     *date = r.edx & 0xFFFF;
  25.     *time = r.ecx & 0xFFFF;
  26.     return 0;
  27.     }
  28. }
  29.